﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Exentials.Xoox.Spreadsheet;

namespace Exentials.Xoox.Spreadsheet
{
    public static partial class XCellExtensions
    {
        public static IEnumerable<XCell> SetContent(this IEnumerable<XCell> cells, DateTime value)
        {
            foreach (var cell in cells) cell.SetContent(value);
            return cells;
        }

        public static IEnumerable<XCell> SetContent(this IEnumerable<XCell> cells, int value)
        {
            foreach (var cell in cells) cell.SetContent(value);
            return cells;
        }

        public static IEnumerable<XCell> SetContent(this IEnumerable<XCell> cells, decimal value)
        {
            foreach (var cell in cells) cell.SetContent(value);
            return cells;
        }

        public static IEnumerable<XCell> SetContent(this IEnumerable<XCell> cells, double value)
        {
            foreach (var cell in cells) cell.SetContent(value);
            return cells;
        }

        public static IEnumerable<XCell> SetContent(this IEnumerable<XCell> cells, string value)
        {
            foreach (var cell in cells) cell.SetContent(value, true);
            return cells;
        }

        public static IEnumerable<XCell> SetContent(this IEnumerable<XCell> cells, Formula value)
        {
            foreach (var cell in cells) cell.SetContent(value);
            return cells;
        }
    }
}
